package com.jwaoo.mobile.view.user.presenter;

import android.app.Activity;

import com.dx.as.listener.IProInterface;
import com.dx.as.listener.IViewInterface;
import com.jwaoo.chat.UserInfo;
import com.jwaoo.mobile.view.user.IUserView;
import com.jwaoo.mobile.view.user.model.UserModel;

/**
 * Created by jwaoo on 2018/1/15.
 */

public class UserPresenter extends IProInterface {
    private UserModel module;
    private IUserView pView;
    public UserPresenter(Activity activity, IViewInterface iViewInterface) {
        super(activity, iViewInterface);
        module = new UserModel(activity.getApplicationContext(),this);
        pView = (IUserView)iViewInterface;
    }

    @Override
    public void initialataData() {

    }
    public void getContactInfo(int uuid){
        module.getContactInfo(uuid);
    }

    @Override
    public void onResponse(Object response, int flg) {
        if (response != null) {
            UserInfo userInfo = (UserInfo) response;
            pView.getUserInfo(userInfo);
        }
    }
}
